package com.leetcode.concurrency.singleton;

/**
 * @author Dennis Li
 * @date 2020/8/11 19:56
 */
public class Lazy {

    private static Lazy INSTANCE;

    private Lazy(){}

    public static Lazy getInstance() {
        if (INSTANCE == null) {
            synchronized (Lazy.class) {
                if (INSTANCE == null) {
                    INSTANCE = new Lazy();
                }
            }
        }
        return INSTANCE;
    }

}
